function isDigital(strval) {
  if (strval == null)
    return null;

  var val = null;
  var strArray = strval.split('.');
  if (strArray.length > 2)
    return null;

  strArray = strval.split('-');
  if (strArray.length > 2)
    return null;

  if (strval.indexOf('-') > -1 && strval[0] != '-')
    return null;

  var isPass = false;
  for (var i = 0; i < strval.length; i++) {
    if ("0123456789".includes(strval[i])) {
      isPass = true;
      break;
    }
  }

  if (!isPass)
    return null;

  return strval;
}
